import { _ as _export_sfc, m as mpMixin, a as mixin, j as resolveEasycom, k as resolveDynamicComponent, c as createBlock, o as openBlock, w as withCtx, b as createVNode, i as index$g, n as normalizeStyle, f as normalizeClass, J as __easycom_0, e as createCommentVNode, r as renderSlot, p as index$q, s as index$i, t as createTextVNode, u as toDisplayString, a1 as navigateTo, I as switchTab, ah as reLaunch, aJ as redirectTo, ae as Input, z as ref, al as useNavbarHeight, B as onLoad, g as createElementBlock, H as unref, F as Fragment, G as __easycom_0$1, a3 as showToast, ag as navigateBack } from './index-Cc4oxzDN.js';
import { _ as __easycom_4 } from './uv-badge.D4nY_Rjy.js';
import { _ as __easycom_1$1 } from './uv-loading-icon.DuNkB54M.js';
import { _ as __easycom_4$1 } from './uv-button.CpuKY_t2.js';
import { b as __easycom_5$1 } from './uv-toast.nS_Liirv.js';
import { e as orderRefund } from './order.D8qtvuIN.js';
import './platform.EIa5ETLd.js';

const props$1 = {
	props: {
		value: {
			type: [Boolean, String, Number],
			default: false
		},
		modelValue: {
			type: [Boolean, String, Number],
			default: false
		},
		// 是否为加载中状态
		loading: {
			type: Boolean,
			default: false
		},
		// 是否为禁用装填
		disabled: {
			type: Boolean,
			default: false
		},
		// 开关尺寸，单位px
		size: {
			type: [String, Number],
			default: 25
		},
		// 打开时的背景颜色
		activeColor: {
			type: String,
			default: '#2979ff'
		},
		// 关闭时的背景颜色
		inactiveColor: {
			type: String,
			default: '#fff'
		},
		// switch打开时的值
		activeValue: {
			type: [String, Number, Boolean],
			default: true
		},
		// switch关闭时的值
		inactiveValue: {
			type: [String, Number, Boolean],
			default: false
		},
		// 是否开启异步变更，开启后需要手动控制输入值
		asyncChange: {
			type: Boolean,
			default: false
		},
		// 圆点与外边框的距离
		space: {
			type: [String, Number],
			default: 0
		},
		...uni.$uv?.props?.switch
	}
};

/**
	 * switch 开关选择器
	 * @description 选择开关一般用于只有两个选择，且只能选其一的场景。
	 * @tutorial https://www.uvui.cn/components/switch.html
	 * @property {Boolean}						loading			是否处于加载中（默认 false ）
	 * @property {Boolean}						disabled		是否禁用（默认 false ）
	 * @property {String | Number}				size			开关尺寸，单位px （默认 25 ）
	 * @property {String}						activeColor		打开时的背景色 （默认 '#2979ff' ）
	 * @property {String} 						inactiveColor	关闭时的背景色 （默认 '#ffffff' ）
	 * @property {Boolean | String | Number}	value			通过v-model双向绑定的值 （默认 false ）
	 * @property {Boolean | String | Number}	activeValue		打开选择器时通过change事件发出的值 （默认 true ）
	 * @property {Boolean | String | Number}	inactiveValue	关闭选择器时通过change事件发出的值 （默认 false ）
	 * @property {Boolean}						asyncChange		是否开启异步变更，开启后需要手动控制输入值 （默认 false ）
	 * @property {String | Number}				space			圆点与外边框的距离 （默认 0 ）
	 * @property {Object}						customStyle		定义需要用到的外部样式
	 *
	 * @event {Function} change 在switch打开或关闭时触发
	 * @example <uv-switch v-model="checked" active-color="red" inactive-color="#eee"></uv-switch>
	 */
	const _sfc_main$4 = {
		name: "uv-switch",
		mixins: [mpMixin, mixin, props$1],
		data() {
			return {
				bgColor: '#ffffff',
				innerValue: false
			}
		},
		watch: {
			value(newVal) {
				if (newVal !== this.inactiveValue && newVal !== this.activeValue) {
					return this.$uv.error('v-model绑定的值必须为inactiveValue、activeValue二者之一')
				}
				this.innerValue = newVal;
			},
			modelValue(newVal) {
				if (newVal !== this.inactiveValue && newVal !== this.activeValue) {
					return this.$uv.error('v-model绑定的值必须为inactiveValue、activeValue二者之一')
				}
				this.innerValue = newVal;
			}
		},
		created() {
			this.innerValue = this.value || this.modelValue;
		},
		computed: {
			isActive() {
				return this.innerValue === this.activeValue;
			},
			switchStyle() {
				let style = {};
				// 这里需要加2，是为了腾出边框的距离，否则圆点node会和外边框紧贴在一起
				style.width = this.$uv.addUnit(this.$uv.getPx(this.size) * 2 + 2);
				style.height = this.$uv.addUnit(this.$uv.getPx(this.size) + 2);
				// 如果自定义了“非激活”演示，name边框颜色设置为透明(跟非激活颜色一致)
				// 这里不能简单的设置为非激活的颜色，否则打开状态时，会有边框，所以需要透明
				if (this.customInactiveColor) {
					style.borderColor = 'rgba(0, 0, 0, 0)';
				}
				style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor;
				return style;
			},
			nodeStyle() {
				let style = {};
				// 如果自定义非激活颜色，将node圆点的尺寸减少两个像素，让其与外边框距离更大一点
				style.width = this.$uv.addUnit(this.$uv.getPx(this.size) - this.space);
				style.height = this.$uv.addUnit(this.$uv.getPx(this.size) - this.space);
				const translateX = this.isActive ? this.$uv.addUnit(this.space) : this.$uv.addUnit(this.$uv.getPx(this.size));
				style.transform = `translateX(-${translateX})`;
				return style
			},
			bgStyle() {
				let style = {};
				// 这里配置一个多余的元素在HTML中，是为了让switch切换时，有更良好的背景色扩充体验(见实际效果)
				style.width = this.$uv.addUnit(this.$uv.getPx(this.size) * 2 - this.$uv.getPx(this.size) / 2);
				style.height = this.$uv.addUnit(this.$uv.getPx(this.size));
				style.backgroundColor = this.inactiveColor;
				// 打开时，让此元素收缩，否则反之
				style.transform = `scale(${this.isActive ? 0 : 1})`;
				return style
			},
			customInactiveColor() {
				// 之所以需要判断是否自定义了“非激活”颜色，是为了让node圆点离外边框更宽一点的距离
				return this.inactiveColor !== '#fff' && this.inactiveColor !== '#ffffff'
			}
		},
		methods: {
			clickHandler() {
				if (!this.disabled && !this.loading) {
					const oldValue = this.isActive ? this.inactiveValue : this.activeValue;
					if (!this.asyncChange) {
						this.$emit('input', oldValue);
						this.$emit('update:modelValue', oldValue);
					}
					// 放到下一个生命周期，因为双向绑定的value修改父组件状态需要时间，且是异步的
					this.$nextTick(() => {
						this.$emit('change', oldValue);
					});
				}
			}
		}
	};

function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_v_uni_view = index$g;
  const _component_uv_loading_icon = resolveEasycom(resolveDynamicComponent("uv-loading-icon"), __easycom_1$1);

  return (openBlock(), createBlock(_component_v_uni_view, {
    class: normalizeClass(["uv-switch", [_ctx.disabled && 'uv-switch--disabled']]),
    style: normalizeStyle([$options.switchStyle, _ctx.$uv.addStyle(_ctx.customStyle)]),
    onClick: $options.clickHandler
  }, {
    default: withCtx(() => [
      createVNode(_component_v_uni_view, {
        class: "uv-switch__bg",
        style: normalizeStyle([$options.bgStyle])
      }, null, 8, ["style"]),
      createVNode(_component_v_uni_view, {
        class: normalizeClass(["uv-switch__node", [$data.innerValue && 'uv-switch__node--on']]),
        style: normalizeStyle([$options.nodeStyle]),
        ref: "uv-switch__node"
      }, {
        default: withCtx(() => [
          createVNode(_component_uv_loading_icon, {
            show: _ctx.loading,
            mode: "circle",
            timingFunction: "linear",
            color: $data.innerValue ? _ctx.activeColor : '#AAABAD',
            size: _ctx.size * 0.6
          }, null, 8, ["show", "color", "size"])
        ]),
        _: 1
      }, 8, ["class", "style"])
    ]),
    _: 1
  }, 8, ["class", "style", "onClick"]))
}
const __easycom_5 = /*#__PURE__*/_export_sfc(_sfc_main$4, [['render',_sfc_render$3],['__scopeId',"data-v-4477799c"]]);

/**
	 * ListItem 列表子组件
	 * @description 列表子组件
	 * @tutorial https://ext.dcloud.net.cn/plugin?id=24
	 * @property {String} 	title 							标题
	 * @property {String} 	note 							描述
	 * @property {String} 	thumb 							左侧缩略图，若thumb有值，则不会显示扩展图标
	 * @property {String}  	thumbSize = [lg|base|sm]		略缩图大小
	 * 	@value 	 lg			大图
	 * 	@value 	 base		一般
	 * 	@value 	 sm			小图
	 * @property {String} 	rightText 						右侧文字内容
	 * @property {Boolean} 	disabled = [true|false]			是否禁用
	 * @property {Boolean} 	clickable = [true|false] 		是否开启点击反馈
	 * @property {String} 	link = [navigateTo|redirectTo|reLaunch|switchTab] 是否展示右侧箭头并开启点击反馈
	 *  @value 	navigateTo 	同 uni.navigateTo()
	 * 	@value redirectTo 	同 uni.redirectTo()
	 * 	@value reLaunch   	同 uni.reLaunch()
	 * 	@value switchTab  	同 uni.switchTab()
	 * @property {String | PageURIString} 	to  			跳转目标页面
	 * @property {Boolean} 	showBadge = [true|false] 		是否显示数字角标
	 * @property {Object} 	badge  扩展数字角标的参数，格式为 :badge="{value: 122}"
	 * @property {Boolean} 	showSwitch = [true|false] 		是否显示Switch
	 * @property {Boolean} 	switchChecked = [true|false] 	Switch是否被选中
	 * @property {Boolean} 	showExtraIcon = [true|false] 	左侧是否显示扩展图标
	 * @property {Object} 	extraIcon 						扩展图标参数，格式为 :extraIcon="{icon: 'photo',size: '30px'}"
	 * @property {String} 	direction = [row|column]		排版方向
	 * @value row 			水平排列
	 * @value column 		垂直排列
	 * @event {Function} 	click 							点击 uniListItem 触发事件
	 * @event {Function} 	switchChange 					点击切换 Switch 时触发
	 */
	const _sfc_main$3 = {
		name: 'uv-list-item',
		mixins: [mpMixin, mixin],
		emits: ['click', 'switchChange'],
		props: {
			direction: {
				type: String,
				default: 'row'
			},
			title: {
				type: String,
				default: ''
			},
			note: {
				type: String,
				default: ''
			},
			ellipsis: {
				type: [Number, String],
				default: 0
			},
			disabled: {
				type: [Boolean, String],
				default: false
			},
			clickable: {
				type: Boolean,
				default: false
			},
			showArrow: {
				type: [Boolean, String],
				default: false
			},
			link: {
				type: [Boolean, String],
				default: false
			},
			to: {
				type: String,
				default: ''
			},
			showSwitch: {
				type: [Boolean, String],
				default: false
			},
			switchChecked: {
				type: [Boolean, String],
				default: false
			},
			showBadge: {
				type: [Boolean, String],
				default: false
			},
			badge: {
				type: Object,
				default () {
					return {}
				}
			},
			rightText: {
				type: String,
				default: ''
			},
			thumb: {
				type: String,
				default: ''
			},
			thumbSize: {
				type: String,
				default: 'base'
			},
			showExtraIcon: {
				type: [Boolean, String],
				default: false
			},
			extraIcon: {
				type: Object,
				default () {
					return {
						name: '',
						color: '#000000',
						size: 20,
						customPrefix: ''
					};
				}
			},
			border: {
				type: Boolean,
				default: false
			},
			customStyle: {
				type: Object,
				default () {
					return {
						padding: '',
						backgroundColor: '#FFFFFF'
					}
				}
			},
			keepScrollPosition: {
				type: Boolean,
				default: false
			}
		},
		computed: {
			directionData(){
				return this.direction ? this.direction : (this.parentData.direction ? this.parentData.direction : 'row');
			}
		},
		watch: {
			'customStyle.padding': {
				handler(padding) {
					if(padding) this.setPadding(padding);
				},
				immediate: true
			}
		},
		data() {
			return {
				isFirstChild: false,
				padding: {
					top: "",
					right: "",
					bottom: "",
					left: ""
				},
				parentData: {
					direction: 'row',
					padding: 0
				}
			};
		},
		created() {
			this.updateParentData();
		},
		mounted() {
			this.init();
			this.list = this.getForm();
			// 判断是否存在 uv-list 组件
			if (this.list) {
				if (!this.list.firstChildAppend) {
					this.list.firstChildAppend = true;
					this.isFirstChild = true;
				}
			}
		},
		methods: {
			init(){
				if (!this.parent) {
					this.$uv.error('uv-list-item必须搭配uv-list组件使用');
				}
				this.$nextTick(()=>{
					if(!(this.padding.top || this.padding.right|| this.padding.bottom|| this.padding.left)){
						this.setPadding(this.parentData.padding);
					}
				});
			},
			updateParentData() {
				this.getParentData('uv-list');
			},
			setPadding(padding){
				if(typeof padding == 'number'){
					padding += '';
				}
				let paddingArr = padding.split(' ');
				if (paddingArr.length === 1) {
					const allPadding = paddingArr[0];
					this.padding = {
						"top": allPadding,
						"right": allPadding,
						"bottom": allPadding,
						"left": allPadding
					};
				} else if (paddingArr.length === 2) {
					const [verticalPadding, horizontalPadding] = paddingArr;
					this.padding = {
						"top": verticalPadding,
						"right": horizontalPadding,
						"bottom": verticalPadding,
						"left": horizontalPadding
					};
				} else if (paddingArr.length === 4) {
						const [topPadding, rightPadding, bottomPadding, leftPadding] = paddingArr;
						this.padding = {
							"top": topPadding,
							"right": rightPadding,
							"bottom": bottomPadding,
							"left": leftPadding
						};
				}
			},
			/**
			 * 获取父元素实例
			 */
			getForm(name = 'uniList') {
				let parent = this.$parent;
				let parentName = parent.$options.name;
				while (parentName !== name) {
					parent = parent.$parent;
					if (!parent) return false
					parentName = parent.$options.name;
				}
				return parent;
			},
			onClick() {
				if (this.to !== '') {
					this.openPage();
					return;
				}
				if (this.clickable || this.link) {
					this.$emit('click', {
						data: {}
					});
				}
			},
			onSwitchChange(e) {
				this.$emit('switchChange', e);
			},
			openPage() {
				if (['navigateTo', 'redirectTo', 'reLaunch', 'switchTab'].indexOf(this.link) !== -1) {
					this.pageApi(this.link);
				} else {
					this.pageApi('navigateTo');
				}
			},
			pageApi(api) {
				let callback = {
					url: this.to,
					success: res => {
						this.$emit('click', {
							data: res
						});
					},
					fail: err => {
						this.$emit('click', {
							data: err
						});
					}
				};
				switch (api) {
					case 'navigateTo':
						navigateTo(callback);
						break
					case 'redirectTo':
						redirectTo(callback);
						break
					case 'reLaunch':
						reLaunch(callback);
						break
					case 'switchTab':
						switchTab(callback);
						break
					default:
						navigateTo(callback);
				}
			}
		}
	};

function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_v_uni_view = index$g;
  const _component_v_uni_image = index$q;
  const _component_uv_icon = resolveEasycom(resolveDynamicComponent("uv-icon"), __easycom_0);
  const _component_v_uni_text = index$i;
  const _component_uv_badge = resolveEasycom(resolveDynamicComponent("uv-badge"), __easycom_4);
  const _component_uv_switch = resolveEasycom(resolveDynamicComponent("uv-switch"), __easycom_5);

  return (openBlock(), createBlock(_component_v_uni_view, {
    class: normalizeClass([{ 'uv-list-item--disabled': $props.disabled }, "uv-list-item"]),
    style: normalizeStyle([_ctx.$uv.addStyle($props.customStyle),{'background-color':$props.customStyle.backgroundColor?$props.customStyle.backgroundColor:'#fff'}]),
    "hover-class": (!$props.clickable && !$props.link) || $props.disabled || $props.showSwitch ? '' : 'uv-list-item--hover',
    onClick: $options.onClick
  }, {
    default: withCtx(() => [
      (!$data.isFirstChild)
        ? (openBlock(), createBlock(_component_v_uni_view, {
            key: 0,
            class: normalizeClass(["border--left", { 'uv-list--border': $props.border }])
          }, null, 8, ["class"]))
        : createCommentVNode("", true),
      createVNode(_component_v_uni_view, { class: "uv-list-item__wrapper" }, {
        default: withCtx(() => [
          renderSlot(_ctx.$slots, "default", {}, () => [
            createVNode(_component_v_uni_view, {
              class: normalizeClass(["uv-list-item__container", { 'container--right': $props.showArrow || $props.link, 'flex--direction': $options.directionData === 'column'}]),
              style: normalizeStyle({paddingTop:$data.padding.top,paddingLeft:$data.padding.left,paddingRight:$data.padding.right,paddingBottom:$data.padding.bottom})
            }, {
              default: withCtx(() => [
                renderSlot(_ctx.$slots, "header", {}, () => [
                  createVNode(_component_v_uni_view, { class: "uv-list-item__header" }, {
                    default: withCtx(() => [
                      ($props.thumb)
                        ? (openBlock(), createBlock(_component_v_uni_view, {
                            key: 0,
                            class: "uv-list-item__icon"
                          }, {
                            default: withCtx(() => [
                              createVNode(_component_v_uni_image, {
                                src: $props.thumb,
                                class: normalizeClass(["uv-list-item__icon-img", ['uv-list--' + $props.thumbSize]])
                              }, null, 8, ["src", "class"])
                            ]),
                            _: 1
                          }))
                        : ($props.showExtraIcon)
                          ? (openBlock(), createBlock(_component_v_uni_view, {
                              key: 1,
                              class: "uv-list-item__icon"
                            }, {
                              default: withCtx(() => [
                                createVNode(_component_uv_icon, {
                                  name: $props.extraIcon.icon,
                                  customPrefix: $props.extraIcon.customPrefix,
                                  color: $props.extraIcon.color,
                                  size: $props.extraIcon.size
                                }, null, 8, ["name", "customPrefix", "color", "size"])
                              ]),
                              _: 1
                            }))
                          : createCommentVNode("", true)
                    ]),
                    _: 1
                  })
                ], true),
                renderSlot(_ctx.$slots, "body", {}, () => [
                  createVNode(_component_v_uni_view, {
                    class: normalizeClass(["uv-list-item__content", { 'uv-list-item__content--center': $props.thumb || $props.showExtraIcon || $props.showBadge || $props.showSwitch }])
                  }, {
                    default: withCtx(() => [
                      ($props.title)
                        ? (openBlock(), createBlock(_component_v_uni_text, {
                            key: 0,
                            class: normalizeClass(["uv-list-item__content-title", [$props.ellipsis && `uv-line-${$props.ellipsis}`]])
                          }, {
                            default: withCtx(() => [
                              createTextVNode(toDisplayString($props.title), 1)
                            ]),
                            _: 1
                          }, 8, ["class"]))
                        : createCommentVNode("", true),
                      ($props.note)
                        ? (openBlock(), createBlock(_component_v_uni_text, {
                            key: 1,
                            class: "uv-list-item__content-note"
                          }, {
                            default: withCtx(() => [
                              createTextVNode(toDisplayString($props.note), 1)
                            ]),
                            _: 1
                          }))
                        : createCommentVNode("", true)
                    ]),
                    _: 1
                  }, 8, ["class"])
                ], true),
                renderSlot(_ctx.$slots, "footer", {}, () => [
                  ($props.rightText || $props.showBadge || $props.showSwitch)
                    ? (openBlock(), createBlock(_component_v_uni_view, {
                        key: 0,
                        class: normalizeClass(["uv-list-item__extra", { 'flex--justify': $options.directionData === 'column' }])
                      }, {
                        default: withCtx(() => [
                          ($props.rightText)
                            ? (openBlock(), createBlock(_component_v_uni_text, {
                                key: 0,
                                class: "uv-list-item__extra-text"
                              }, {
                                default: withCtx(() => [
                                  createTextVNode(toDisplayString($props.rightText), 1)
                                ]),
                                _: 1
                              }))
                            : createCommentVNode("", true),
                          ($props.showBadge)
                            ? (openBlock(), createBlock(_component_uv_badge, {
                                key: 1,
                                show: !!($props.badge.show || $props.badge.isDot || $props.badge.value),
                                isDot: $props.badge.isDot,
                                value: $props.badge.value,
                                max: $props.badge.max,
                                type: $props.badge.type,
                                showZero: $props.badge.showZero,
                                bgColor: $props.badge.bgColor,
                                color: $props.badge.color,
                                shape: $props.badge.shape,
                                numberType: $props.badge.numberType,
                                inverted: $props.badge.inverted,
                                customStyle: "margin-left: 4px;"
                              }, null, 8, ["show", "isDot", "value", "max", "type", "showZero", "bgColor", "color", "shape", "numberType", "inverted"]))
                            : createCommentVNode("", true),
                          ($props.showSwitch)
                            ? (openBlock(), createBlock(_component_uv_switch, {
                                key: 2,
                                value: $props.switchChecked,
                                disabled: $props.disabled,
                                onChange: $options.onSwitchChange
                              }, null, 8, ["value", "disabled", "onChange"]))
                            : createCommentVNode("", true)
                        ]),
                        _: 1
                      }, 8, ["class"]))
                    : createCommentVNode("", true)
                ], true)
              ]),
              _: 3
            }, 8, ["class", "style"])
          ], true)
        ]),
        _: 3
      }),
      ($props.showArrow || $props.link)
        ? (openBlock(), createBlock(_component_uv_icon, {
            key: 1,
            size: "34rpx",
            class: "uv-icon-wrapper",
            color: "#bbb",
            name: "arrow-right"
          }))
        : createCommentVNode("", true)
    ]),
    _: 3
  }, 8, ["class", "style", "hover-class", "onClick"]))
}
const __easycom_1 = /*#__PURE__*/_export_sfc(_sfc_main$3, [['render',_sfc_render$2],['__scopeId',"data-v-e7cffe7d"]]);

const props = {
	props: {
		value: {
			type: [String, Number],
			default: ''
		},
		modelValue: {
			type: [String, Number],
			default: ''
		},
		// 输入框类型
		// number-数字输入键盘，app-vue下可以输入浮点数，app-nvue和小程序平台下只能输入整数
		// idcard-身份证输入键盘，微信、支付宝、百度、QQ小程序
		// digit-带小数点的数字键盘，App的nvue页面、微信、支付宝、百度、头条、QQ小程序
		// text-文本输入键盘
		type: {
			type: String,
			default: 'text'
		},
		// 是否禁用输入框
		disabled: {
			type: Boolean,
			default: false
		},
		// 禁用状态时的背景色
		disabledColor: {
			type: String,
			default: '#f5f7fa'
		},
		// 是否显示清除控件
		clearable: {
			type: Boolean,
			default: false
		},
		// 是否密码类型
		password: {
			type: Boolean,
			default: false
		},
		// 最大输入长度，设置为 -1 的时候不限制最大长度
		maxlength: {
			type: [String, Number],
			default: -1
		},
		// 	输入框为空时的占位符
		placeholder: {
			type: String,
			default: null
		},
		// 指定placeholder的样式类，注意页面或组件的style中写了scoped时，需要在类名前写/deep/
		placeholderClass: {
			type: String,
			default: 'input-placeholder'
		},
		// 指定placeholder的样式
		placeholderStyle: {
			type: [String, Object],
			default: 'color: #c0c4cc'
		},
		// 设置右下角按钮的文字，有效值：send|search|next|go|done，兼容性详见uni-app文档
		// https://uniapp.dcloud.io/component/input
		// https://uniapp.dcloud.io/component/textarea
		confirmType: {
			type: String,
			default: 'done'
		},
		// 点击键盘右下角按钮时是否保持键盘不收起，H5无效
		confirmHold: {
			type: Boolean,
			default: false
		},
		// focus时，点击页面的时候不收起键盘，微信小程序有效
		holdKeyboard: {
			type: Boolean,
			default: false
		},
		// 自动获取焦点
		// 在 H5 平台能否聚焦以及软键盘是否跟随弹出，取决于当前浏览器本身的实现。nvue 页面不支持，需使用组件的 focus()、blur() 方法控制焦点
		focus: {
			type: Boolean,
			default: false
		},
		// 键盘收起时，是否自动失去焦点，目前仅App3.0.0+有效
		autoBlur: {
			type: Boolean,
			default: false
		},
		// 指定focus时光标的位置
		cursor: {
			type: [String, Number],
			default: -1
		},
		// 输入框聚焦时底部与键盘的距离
		cursorSpacing: {
			type: [String, Number],
			default: 30
		},
		// 光标起始位置，自动聚集时有效，需与selection-end搭配使用
		selectionStart: {
			type: [String, Number],
			default: -1
		},
		// 光标结束位置，自动聚集时有效，需与selection-start搭配使用
		selectionEnd: {
			type: [String, Number],
			default: -1
		},
		// 键盘弹起时，是否自动上推页面
		adjustPosition: {
			type: Boolean,
			default: true
		},
		// 输入框内容对齐方式，可选值为：left|center|right
		inputAlign: {
			type: String,
			default: 'left'
		},
		// 输入框字体的大小
		fontSize: {
			type: [String, Number],
			default: '14px'
		},
		// 输入框字体颜色
		color: {
			type: String,
			default: '#303133'
		},
		// 输入框前置图标
		prefixIcon: {
			type: String,
			default: ''
		},
		// 前置图标样式，对象或字符串
		prefixIconStyle: {
			type: [String, Object],
			default: ''
		},
		// 输入框后置图标
		suffixIcon: {
			type: String,
			default: ''
		},
		// 后置图标样式，对象或字符串
		suffixIconStyle: {
			type: [String, Object],
			default: ''
		},
		// 边框类型，surround-四周边框，bottom-底部边框，none-无边框
		border: {
			type: String,
			default: 'surround'
		},
		// 是否只读，与disabled不同之处在于disabled会置灰组件，而readonly则不会
		readonly: {
			type: Boolean,
			default: false
		},
		// 输入框形状，circle-圆形，square-方形
		shape: {
			type: String,
			default: 'square'
		},
		// 用于处理或者过滤输入框内容的方法
		formatter: {
			type: [Function, null],
			default: null
		},
		// 是否忽略组件内对文本合成系统事件的处理
		ignoreCompositionEvent: {
			type: Boolean,
			default: true
		},
		...uni.$uv?.props?.input
	}
};

/**
	 * Input 输入框
	 * @description  此组件为一个输入框，默认没有边框和样式，是专门为配合表单组件uv-form而设计的，利用它可以快速实现表单验证，输入内容，下拉选择等功能。
	 * @tutorial https://www.uvui.cn/components/input.html
	 * @property {String | Number}	value					输入的值
	 * @property {String}			type					输入框类型，见上方说明 （ 默认 'text' ）
	 * @property {Boolean}			fixed					如果 textarea 是在一个 position:fixed 的区域，需要显示指定属性 fixed 为 true，兼容性：微信小程序、百度小程序、字节跳动小程序、QQ小程序 （ 默认 false ）
	 * @property {Boolean}			disabled				是否禁用输入框 （ 默认 false ）
	 * @property {String}			disabledColor			禁用状态时的背景色（ 默认 '#f5f7fa' ）
	 * @property {Boolean}			clearable				是否显示清除控件 （ 默认 false ）
	 * @property {Boolean}			password				是否密码类型 （ 默认 false ）
	 * @property {String | Number}	maxlength				最大输入长度，设置为 -1 的时候不限制最大长度 （ 默认 -1 ）
	 * @property {String}			placeholder				输入框为空时的占位符
	 * @property {String}			placeholderClass		指定placeholder的样式类，注意页面或组件的style中写了scoped时，需要在类名前写/deep/ （ 默认 'input-placeholder' ）
	 * @property {String | Object}	placeholderStyle		指定placeholder的样式，字符串/对象形式，如"color: red;"
	 * @property {Boolean}			showWordLimit			是否显示输入字数统计，只在 type ="text"或type ="textarea"时有效 （ 默认 false ）
	 * @property {String}			confirmType				设置右下角按钮的文字，兼容性详见uni-app文档 （ 默认 'done' ）
	 * @property {Boolean}			confirmHold				点击键盘右下角按钮时是否保持键盘不收起，H5无效 （ 默认 false ）
	 * @property {Boolean}			holdKeyboard			focus时，点击页面的时候不收起键盘，微信小程序有效 （ 默认 false ）
	 * @property {Boolean}			focus					自动获取焦点，在 H5 平台能否聚焦以及软键盘是否跟随弹出，取决于当前浏览器本身的实现。nvue 页面不支持，需使用组件的 focus()、blur() 方法控制焦点 （ 默认 false ）
	 * @property {Boolean}			autoBlur				键盘收起时，是否自动失去焦点，目前仅App3.0.0+有效 （ 默认 false ）
	 * @property {Boolean}			disableDefaultPadding	是否去掉 iOS 下的默认内边距，仅微信小程序，且type=textarea时有效 （ 默认 false ）
	 * @property {String ｜ Number}	cursor					指定focus时光标的位置（ 默认 -1 ）
	 * @property {String ｜ Number}	cursorSpacing			输入框聚焦时底部与键盘的距离 （ 默认 30 ）
	 * @property {String ｜ Number}	selectionStart			光标起始位置，自动聚集时有效，需与selection-end搭配使用 （ 默认 -1 ）
	 * @property {String ｜ Number}	selectionEnd			光标结束位置，自动聚集时有效，需与selection-start搭配使用 （ 默认 -1 ）
	 * @property {Boolean}			adjustPosition			键盘弹起时，是否自动上推页面 （ 默认 true ）
	 * @property {String}			inputAlign				输入框内容对齐方式（ 默认 'left' ）
	 * @property {String | Number}	fontSize				输入框字体的大小 （ 默认 '15px' ）
	 * @property {String}			color					输入框字体颜色	（ 默认 '#303133' ）
	 * @property {Function}			formatter			    内容式化函数
	 * @property {String}			prefixIcon				输入框前置图标
	 * @property {String | Object}	prefixIconStyle			前置图标样式，对象或字符串
	 * @property {String}			suffixIcon				输入框后置图标
	 * @property {String | Object}	suffixIconStyle			后置图标样式，对象或字符串
	 * @property {String}			border					边框类型，surround-四周边框，bottom-底部边框，none-无边框 （ 默认 'surround' ）
	 * @property {Boolean}			readonly				是否只读，与disabled不同之处在于disabled会置灰组件，而readonly则不会 （ 默认 false ）
	 * @property {String}			shape					输入框形状，circle-圆形，square-方形 （ 默认 'square' ）
	 * @property {Object}			customStyle				定义需要用到的外部样式
	 * @property {Boolean}			ignoreCompositionEvent	是否忽略组件内对文本合成系统事件的处理。
	 * @example <uv-input v-model="value" :password="true" suffix-icon="lock-fill" />
	 */
	const _sfc_main$2 = {
		name: "uv-input",
		mixins: [mpMixin, mixin, props],
		data() {
			return {
				// 输入框的值
				innerValue: "",
				// 是否处于获得焦点状态
				focused: false,
				// 过滤处理方法
				innerFormatter: value => value
			}
		},
		created() {




			this.innerValue = this.modelValue;

		},
		watch: {
			value(newVal){
				this.innerValue = newVal;
			},
			modelValue(newVal){
				this.innerValue = newVal;
			}
		},
		computed: {
			// 是否显示清除控件
			isShowClear() {
				const { clearable, readonly, focused, innerValue } = this;
				return !!clearable && !readonly && !!focused && innerValue !== "";
			},
			// 组件的类名
			inputClass() {
				let classes = [],
					{ border, disabled, shape } = this;
				border === "surround" &&
					(classes = classes.concat(["uv-border", "uv-input--radius"]));
				classes.push(`uv-input--${shape}`);
				border === "bottom" &&
					(classes = classes.concat([
						"uv-border-bottom",
						"uv-input--no-radius",
					]));
				return classes.join(" ");
			},
			// 组件的样式
			wrapperStyle() {
				const style = {};
				// 禁用状态下，被背景色加上对应的样式
				if (this.disabled) {
					style.backgroundColor = this.disabledColor;
				}
				// 无边框时，去除内边距
				if (this.border === "none") {
					style.padding = "0";
				} else {
					// 由于uni-app的iOS开发者能力有限，导致需要分开写才有效
					style.paddingTop = "6px";
					style.paddingBottom = "6px";
					style.paddingLeft = "9px";
					style.paddingRight = "9px";
				}
				return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle));
			},
			// 输入框的样式
			inputStyle() {
				const style = {
					color: this.color,
					fontSize: this.$uv.addUnit(this.fontSize),
					textAlign: this.inputAlign
				};

				if(this.disabled || this.readonly) {
					style['pointer-events'] = 'none';
				}

				return style;
			}
		},
		methods: {
			// 在微信小程序中，不支持将函数当做props参数，故只能通过ref形式调用
			setFormatter(e) {
				this.innerFormatter = e;
			},
			// 当键盘输入时，触发input事件
			onInput(e) {
				let { value = "" } = e.detail || {};
				// 格式化过滤方法
				const formatter = this.formatter || this.innerFormatter;
				const formatValue = formatter(value);
				// 为了避免props的单向数据流特性，需要先将innerValue值设置为当前值，再在$nextTick中重新赋予设置后的值才有效
				this.innerValue = value;
				this.$nextTick(() => {
					this.innerValue = formatValue;
					this.valueChange();
				});
			},
			// 输入框失去焦点时触发
			onBlur(event) {
				this.$emit("blur", event.detail.value);
				// H5端的blur会先于点击清除控件的点击click事件触发，导致focused
				// 瞬间为false，从而隐藏了清除控件而无法被点击到
				this.$uv.sleep(100).then(() => {
					this.focused = false;
				});
				// 尝试调用uv-form的验证方法
				this.$uv.formValidate(this, "blur");
			},
			// 输入框聚焦时触发
			onFocus(event) {
				this.focused = true;
				this.$emit("focus");
			},
			// 点击完成按钮时触发
			onConfirm(event) {
				this.$emit("confirm", this.innerValue);
			},
			// 键盘高度发生变化的时候触发此事件
			// 兼容性：微信小程序2.7.0+、App 3.1.0+
			onkeyboardheightchange(e) {
				this.$emit("keyboardheightchange",e);
			},
			// 内容发生变化，进行处理
			valueChange() {
				if(this.isClear) this.innerValue = '';
				const value = this.innerValue;
				this.$nextTick(() => {
					this.$emit("input", value);
					this.$emit("update:modelValue", value);
					this.$emit("change", value);
					// 尝试调用uv-form的验证方法
					this.$uv.formValidate(this, "change");
				});
			},
			// 点击清除控件
			onClear() {
				this.innerValue = "";
				this.isClear = true;
				this.$uv.sleep(100).then(res=>{
					this.isClear = false;
				});
				this.$nextTick(() => {
					this.$emit("clear");
					this.valueChange();
				});
			},
			/**
			 * 在安卓nvue上，事件无法冒泡
			 * 在某些时间，我们希望监听uv-from-item的点击事件，此时会导致点击uv-form-item内的uv-input后
			 * 无法触发uv-form-item的点击事件，这里通过手动调用uv-form-item的方法进行触发
			 */
			clickHandler() {








			}
		}
	};

function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_uv_icon = resolveEasycom(resolveDynamicComponent("uv-icon"), __easycom_0);
  const _component_v_uni_view = index$g;
  const _component_v_uni_input = Input;

  return (openBlock(), createBlock(_component_v_uni_view, {
    class: normalizeClass(["uv-input", $options.inputClass]),
    style: normalizeStyle([$options.wrapperStyle])
  }, {
    default: withCtx(() => [
      createVNode(_component_v_uni_view, { class: "uv-input__content" }, {
        default: withCtx(() => [
          createVNode(_component_v_uni_view, { class: "uv-input__content__prefix-icon" }, {
            default: withCtx(() => [
              renderSlot(_ctx.$slots, "prefix", {}, () => [
                (_ctx.prefixIcon)
                  ? (openBlock(), createBlock(_component_uv_icon, {
                      key: 0,
                      name: _ctx.prefixIcon,
                      size: "18",
                      customStyle: _ctx.prefixIconStyle
                    }, null, 8, ["name", "customStyle"]))
                  : createCommentVNode("", true)
              ], true)
            ]),
            _: 3
          }),
          createVNode(_component_v_uni_view, {
            class: "uv-input__content__field-wrapper",
            onClick: $options.clickHandler
          }, {
            default: withCtx(() => [
              createVNode(_component_v_uni_input, {
                class: "uv-input__content__field-wrapper__field",
                style: normalizeStyle([$options.inputStyle]),
                type: _ctx.type,
                focus: _ctx.focus,
                cursor: _ctx.cursor,
                value: $data.innerValue,
                "auto-blur": _ctx.autoBlur,
                disabled: _ctx.disabled || _ctx.readonly,
                maxlength: _ctx.maxlength,
                placeholder: _ctx.placeholder,
                "placeholder-style": _ctx.placeholderStyle,
                "placeholder-class": _ctx.placeholderClass,
                "confirm-type": _ctx.confirmType,
                "confirm-hold": _ctx.confirmHold,
                "hold-keyboard": _ctx.holdKeyboard,
                "cursor-spacing": _ctx.cursorSpacing,
                "adjust-position": _ctx.adjustPosition,
                "selection-end": _ctx.selectionEnd,
                "selection-start": _ctx.selectionStart,
                password: _ctx.password || _ctx.type === 'password' || undefined,
                ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
                onInput: $options.onInput,
                onBlur: $options.onBlur,
                onFocus: $options.onFocus,
                onConfirm: $options.onConfirm,
                onKeyboardheightchange: $options.onkeyboardheightchange
              }, null, 8, ["style", "type", "focus", "cursor", "value", "auto-blur", "disabled", "maxlength", "placeholder", "placeholder-style", "placeholder-class", "confirm-type", "confirm-hold", "hold-keyboard", "cursor-spacing", "adjust-position", "selection-end", "selection-start", "password", "ignoreCompositionEvent", "onInput", "onBlur", "onFocus", "onConfirm", "onKeyboardheightchange"])
            ]),
            _: 1
          }, 8, ["onClick"]),
          ($options.isShowClear)
            ? (openBlock(), createBlock(_component_v_uni_view, {
                key: 0,
                class: "uv-input__content__clear",
                onClick: $options.onClear
              }, {
                default: withCtx(() => [
                  createVNode(_component_uv_icon, {
                    name: "close",
                    size: "11",
                    color: "#ffffff",
                    customStyle: "line-height: 12px"
                  })
                ]),
                _: 1
              }, 8, ["onClick"]))
            : createCommentVNode("", true),
          createVNode(_component_v_uni_view, { class: "uv-input__content__subfix-icon" }, {
            default: withCtx(() => [
              renderSlot(_ctx.$slots, "suffix", {}, () => [
                (_ctx.suffixIcon)
                  ? (openBlock(), createBlock(_component_uv_icon, {
                      key: 0,
                      name: _ctx.suffixIcon,
                      size: "18",
                      customStyle: _ctx.suffixIconStyle
                    }, null, 8, ["name", "customStyle"]))
                  : createCommentVNode("", true)
              ], true)
            ]),
            _: 3
          })
        ]),
        _: 3
      })
    ]),
    _: 3
  }, 8, ["class", "style"]))
}
const __easycom_2 = /*#__PURE__*/_export_sfc(_sfc_main$2, [['render',_sfc_render$1],['__scopeId',"data-v-f5be3788"]]);

/**
	 * List 列表
	 * @description 列表组件
	 * @tutorial https://www.uvui.cn/components/list.html
	 * @property {Boolean} border = [true|false] 是否显示边框
	 * @property {String} borderColor 边框颜色
	 * @property {String} direction 排版方向，默认row，列表里面使用其他组件  最好设置成column
	 */
	const _sfc_main$1 = {
		name: 'uv-list',
		mixins: [mpMixin, mixin],
		'mp-weixin': {
			options: {
				multipleSlots: false
			}
		},
		props: {
			border: {
				type: Boolean,
				default: false
			},
			borderColor: {
				type: String,
				default: '#dadbde'
			},
			// 排版方向，默认row，列表里面使用其他组件  最好设置成column
			direction: {
				type: String,
				default: 'row'
			},
			// 内边距
			padding: {
				type: [String,Number],
				default: '20rpx 30rpx'
			}
		},
		created() {
			this.firstChildAppend = false;
		},
		computed: {
			parentData() {
				return [this.direction,this.padding];
			}
		},
		methods: {
			loadMore(e) {
				this.$emit('scrolltolower');
			},
			scroll(e) {
				this.$emit('scroll', e);
			}
		}
	};

function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_v_uni_view = index$g;

  return (openBlock(), createBlock(_component_v_uni_view, {
    class: "uv-list",
    style: normalizeStyle([_ctx.$uv.addStyle(_ctx.customStyle)])
  }, {
    default: withCtx(() => [
      ($props.border)
        ? (openBlock(), createBlock(_component_v_uni_view, {
            key: 0,
            class: "uv-list--border-top",
            style: normalizeStyle([{ 'background-color': $props.borderColor }])
          }, null, 8, ["style"]))
        : createCommentVNode("", true),
      renderSlot(_ctx.$slots, "default", {}, undefined, true),
      ($props.border)
        ? (openBlock(), createBlock(_component_v_uni_view, {
            key: 1,
            class: "uv-list--border-bottom",
            style: normalizeStyle([{ 'background-color': $props.borderColor }])
          }, null, 8, ["style"]))
        : createCommentVNode("", true)
    ]),
    _: 3
  }, 8, ["style"]))
}
const __easycom_3 = /*#__PURE__*/_export_sfc(_sfc_main$1, [['render',_sfc_render],['__scopeId',"data-v-08ecc9d2"]]);

const _sfc_main = {
  __name: 'refund',
  setup(__props) {

const title = ref('申请退款');

// 获取导航栏高度
const { navbarHeightCss } = useNavbarHeight();

	// 返回上一页
	const $onClickLeft = () => {
		navigateBack();
	};

const orderId = ref('');
const payPrice = ref('');
const totalPrice = ref('');
const refundReasonWapExplain = ref('');
const toast = ref();
onLoad((option) => {
	console.log('option:',option);
	orderId.value = option.orderId;
	payPrice.value = option.payPrice;
	totalPrice.value = option.totalPrice;
});

const refund  = async() => {
	let data = await orderRefund({refundReasonWapExplain:refundReasonWapExplain.value,uni:orderId.value,text:'协商一致'});
	if (data) {
		showToast({
			title: '提交成功',
			icon: 'success'
		});
	}
};


return (_ctx, _cache) => {
  const _component_uv_navbar = resolveEasycom(resolveDynamicComponent("uv-navbar"), __easycom_0$1);
  const _component_uv_list_item = resolveEasycom(resolveDynamicComponent("uv-list-item"), __easycom_1);
  const _component_uv_input = resolveEasycom(resolveDynamicComponent("uv-input"), __easycom_2);
  const _component_uv_list = resolveEasycom(resolveDynamicComponent("uv-list"), __easycom_3);
  const _component_uv_button = resolveEasycom(resolveDynamicComponent("uv-button"), __easycom_4$1);
  const _component_v_uni_view = index$g;
  const _component_uv_toast = resolveEasycom(resolveDynamicComponent("uv-toast"), __easycom_5$1);

  return (openBlock(), createElementBlock(Fragment, null, [
    createVNode(_component_uv_navbar, {
      fixed: true,
      title: title.value,
      "left-arrow": "",
      onLeftClick: $onClickLeft
    }, null, 8, ["title"]),
    createVNode(_component_v_uni_view, {
      class: "p-2",
      style: normalizeStyle(`padding-top: ${unref(navbarHeightCss)};`)
    }, {
      default: withCtx(() => [
        createVNode(_component_uv_list, null, {
          default: withCtx(() => [
            createVNode(_component_uv_list_item, {
              title: "订单金额",
              rightText: '¥'+totalPrice.value
            }, null, 8, ["rightText"]),
            createVNode(_component_uv_list_item, {
              title: "退款金额",
              rightText: '¥'+payPrice.value
            }, null, 8, ["rightText"]),
            createVNode(_component_uv_list_item, {
              title: "退款类型",
              rightText: "整个订单"
            }),
            createVNode(_component_uv_list_item, {
              title: "退款原因",
              rightText: "协商一致"
            }),
            createVNode(_component_uv_list_item, { title: "退款留言" }, {
              footer: withCtx(() => [
                createVNode(_component_uv_input, {
                  placeholder: "请输入内容",
                  border: "none",
                  modelValue: refundReasonWapExplain.value,
                  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((refundReasonWapExplain).value = $event))
                }, null, 8, ["modelValue"])
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        createVNode(_component_v_uni_view, { class: "mt-2" }, {
          default: withCtx(() => [
            createVNode(_component_uv_button, {
              shape: "circle",
              type: "warning",
              plain: true,
              size: "small",
              text: "申请退款",
              onClick: _cache[1] || (_cache[1] = $event => (refund()))
            })
          ]),
          _: 1
        }),
        createVNode(_component_uv_toast, {
          ref_key: "toast",
          ref: toast
        }, null, 512)
      ]),
      _: 1
    }, 8, ["style"])
  ], 64))
}
}

};

export { _sfc_main as default };
